package com.ytjj.qmyx.admin.eunm;

public enum WebStatisticsNameCode {

    INDEX("/", "首页"),
    APPHOME("", "首页"),
    HOME("/pages/home/home", "首页"),
    DISCOVER("/pages/discover/discover", "社区页"),
    CART("pages/cart/cart", "购物车"),
    MEMBER_INDEX("pages/member/index", "个人中心"),
    SPIKETIME("pages/activity/spikeTime/index", "秒杀"),
    AUCTION("/pages/activity/auction/auction", "一元捡漏"),
    COLLECT_ACTIVITY("/pages/activity/collectActivity/collectActivity", "活动聚合页"),
    COUPON("/pages/activity/coupon/index", "优惠券"),
    INTEGRAL_CENTER("/pages/activity/integralCenter/index", "积分中心"),
    MY_WALLET("/pages/activity/myWallet/index", "我的钱包"),
    NEW_PRODUCT("/pages/activity/newProduct/index", "新品严选招募令"),
    NEW_USER_WELFARE("/pages/activity/newUserWelfare/index", "新人福利"),
    OLD2NEW("/pages/activity/old2New/index", "以旧换新"),
    SUBSIDY("/pages/activity/subsidy/index", "百亿补贴"),
    GALLERY("/pages/activity/gallery/gallery", "画廊页"),
    AUCTION_DETAIL("/packageB/pages/productDetail/auction", "一元捡漏详情"),
    CASH_SCORE("/packageB/pages/productDetail/cashScore","积分详情"),
    COUPON_DETAIL("/packageB/pages/productDetail/coupon", "现金券详情"),
    GET_SCORE("/packageB/pages/productDetail/getScore", "获取积分详情"),
    NEW_PRODUCT_DETAIL("/packageB/pages/productDetail/newProduct", "新品详情"),
    NEW_USER_WELFARE_DETAIL("/packageB/pages/productDetail/newUserWelfare", "新人福利详情"),
    NORMAL_DETAIL("/packageB/pages/productDetail/normal", "普通商品详情页"),
    OLD2NEW_DETAIL("/packageB/pages/productDetail/old2New", "以旧换新详情"),
    RETURN_CASH("/packageB/pages/productDetail/returnCash", "买立返详情"),
    SECKILL("/packageB/pages/productDetail/seckill", "秒杀详情"),
    SUBSIDY_DETAIL("/packageB/pages/productDetail/subsidy","百亿补贴详情"),
    PLAYCVIDEO("/pages/discover/playVideo/playVideo", "社区页视频"),
    LIVE_ROOMLIVE("/pages/live/roomLive", "直播页");

    private String code;

    private String name;

    WebStatisticsNameCode(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    /**
     * 根据枚举code获取名称
     * @param code
     * @return
     */
    public static String getPageName(String code){
        WebStatisticsNameCode[] list = WebStatisticsNameCode.values();
        for (WebStatisticsNameCode item : list) {
            if (item.getCode().equals(code)) {
                return item.getName();
            }
        }
        return null;
    }

}
